<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <link rel="stylesheet" type="text/css" href="__CSS__/base.css">
    <link rel="stylesheet" type="text/css" href="__CSS__/lowerincome.css">
    <script src="__JS__/jquery-3.1.1.min.js"></script>
    <script type="text/javascript" src="__JS__/reset.js"></script>
    <title>我的下级收益</title>
</head>
<body>
    <div class="wrap">
      <div class="header">
        <i class="iconfont icon" id="toMy">&#xe60e;</i>
        <div class="header_title">我的下级收益</div>
      </div>
      <!-- main -->
      <div class="main">

          <div class="top_money">
              <div class="left_msg">
                <p class="title">下级数量</p>
                <p class="money">{$userInfo.subordinate_num}</p>
              </div>
              <div class="right_msg">
                  <p class="title">下级奖励总额度(元)</p>
                  <p class="money">{$userInfo.fall_into_amount_count/100}</p>
              </div>
            </div>

         <!-- 提现详情列表 -->
         <dl class="detail">
            <dt class="top_title">
              <p class="time">收益时间</p>
              <p class="title">下级ID</p>
              <p class="money">收益金额</p>
            </dt>
             {volist name="incomeDetail" id="incomeDetail"}
            <dd class="dd_con">
              <p class="time">{$incomeDetail.add_time|date="Y-m-d H:i:s",###}</p>
              <p class="title">下级{$incomeDetail.user_id}提现分成</p>
              <p class="money">{$incomeDetail.amount/100}</p>
            </dd>
             {/volist}
          </dl>
      </div>
    </div>
    <script>
        let page = 1;  //加载页面
        $(function(){
            let height =  $(window).height() - $('.footer').height();
            $('.main').css('height',height+'px');
            $('.main').dropload({
                /* 上拉加载 */
                loadDownFn: function(me){

                    me.resetload();
                    $.post("",{page:page},function(data){
                        let str = '';
                        for(var i in data){
                            str+= "  <dd class=\"dd_con\">" +
                                "              <p class=\"time\">"+data[i]['add_time']+"</p>" +
                                "              <p class=\"title\">下级"+data[i]['user_id']+"提现分成</p>" +
                                "              <p class=\"money\">"+(data[i]['amount']/100)+"</p>" +
                                "            </dd>";
                        }
                        me.resetload();
                        $(".main .list").append(str);
                        page++;
                    })
                }/*,
              /!* 下拉刷新 *!/
              loadUpFn: function(me){

                  let str = '<li class="item" onclick="showImg(this)">'+
                              '<img class="item_img" src="https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1539774221081&di=be5f47dc044e9da562b1e2a9ddf0dbf0&imgtype=0&src=http%3A%2F%2Fpic38.nipic.com%2F20140302%2F9352546_213533724000_2.jpg" alt="">'+
                              '<p class="item_money">3048元</p>'+
                            '</li>';
                  $(".main .list").html(str);
                  console.log(me);
                  me.resetload();
              },*/
            });
        })
    </script>
</body>
</html>